﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Web.Script.Serialization;
using System.Runtime.Serialization.Json;
using System.Net.Http.Formatting.Parsers;

namespace GoDive.Common
{
    public class BaseJsonResult : ContentResult
    {
        JavaScriptSerializer seriializer = new JavaScriptSerializer() { MaxJsonLength = int.MaxValue, RecursionLimit = 100 };

        public object Data
        {
            set
            {
                //DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(T));
                //this.Content = serializer.w
            }
        }


        public BaseJsonResult()
            : this(null)
        {
        }


        public BaseJsonResult(object data)
        {
            this.ContentType = "application/json";
            if (data != null)
            {
                this.Data = data;
            }
        }

    }
}
